<template>
    <el-container>
        <el-header class="header">致力于打造专业级美食图库</el-header>
        <el-container>
            <el-aside width="200px">
                <div class="menu">
                    <el-menu
                        default-active="1"
                        class="el-menu-vertical-demo"
                        @select="handleSelect">
                        <el-menu-item index="1">
                            <i class="el-icon-ice-cream-round"></i>
                            <span slot="title">美食图库</span>
                        </el-menu-item>
                        <el-menu-item index="2">
                            <i class="el-icon-ice-cream-square"></i>
                            <span slot="title">门店视频</span>
                        </el-menu-item>
                        <el-menu-item index="3">
                            <i class="el-icon-milk-tea"></i>
                            <span slot="title">点评5图</span>
                        </el-menu-item>
                        <el-menu-item index="4">
                            <i class="el-icon-dessert"></i>
                            <span slot="title">点评菜单</span>
                        </el-menu-item>
                    </el-menu>
                </div>
            </el-aside>
            <el-main>
                <gallery-image v-show="index == 1" type="IMAGE" key="1"></gallery-image>
                <gallery-video v-show="index == 2" type="VIDEO" key="2"></gallery-video>
                <gallery-dp v-show="index == 3"></gallery-dp>
                <gallery-menu v-show="index == 4"></gallery-menu>
            </el-main>
        </el-container>
    </el-container>
</template>

<script>
import GalleryImage from "@/component/gallery/Gallery";
import GalleryVideo from "@/component/gallery/Gallery";
import GalleryDp from "@/component/gallery/GalleryDp";
import GalleryMenu from "@/component/gallery/GalleryMenu";

export default {
    name: "GalleryPage",
    components: {GalleryImage, GalleryVideo, GalleryDp, GalleryMenu},
    data() {
        return {
            index: 1,
        }
    },
    methods: {
        handleSelect(key, keyPath) {
            console.log(key);
            this.index = key;
        },
    },
    created() {

    },
}
</script>

<style scoped>
.header {
    height: 100%;
    width: 100%;
    background-color: rgb(26, 157, 255);
    font-size: 20px;
    line-height: 60px;
}

.el-input {
    width: 150px !important;
}

.el-select {
    width: 150px !important;
}
</style>
